/* eslint-disable no-unused-expressions */
import { defineStore } from "pinia";

const useLoadingStore = defineStore("loading", {
  state: () => ({
    loading: false as boolean,
  }),
  getters: {
    getLoading(): boolean {
      return this.loading;
    },
  },
  actions: {
    setLoadingState(loading: boolean): void {
      this.loading = loading;
    },
  },
});

export default useLoadingStore;
